// 设备状态枚举
export enum EquipmentStatus {
  IDLE = "IDLE", // 空闲中
  RESERVEING = "RESERVEING", // 预约中
  IN_USE = "IN_USE", // 使用中
  REPAIRING = "REPAIRING", // 维护中
  DAMAGED = "DAMAGED", // 损坏
  SCRAPPED = "SCRAPPED", // 报废
}

export interface EquipmentType {
  id?: string | null;
  name: string | null;
  typeId: string | null;
  code: string | null;
  model: string | null;
  chargeUserCode: string | null;
  status: EquipmentStatus;
  location: string | null;
  belong: string | null;
  purchaseDate: number | null;
  deliveryDate: number | null;
  useYears: number | null;
  purchasePrice: number | null;
  description1: string | null;
  description2: string | null;
  // 文件相关字段
  photoIds?: string[];
  documentIds?: string[];
  typeInfo?: {
    id: string;
    name: string;
  };
  chargeUserInfo?: {
    id: string;
    name: string;
  };
}

export interface GetEquipmentListQueryType {
  keyword: string | null;
  typeId: string | null;
  status: EquipmentStatus;
  belong: string | null;
  page: number | null;
  size: number | null;
  currentUserCode: string | null;
}

export interface AddOrUpdateEquipmentQueryType {
  id?: string | null;
  name: string | null;
  typeId: string | null;
  code: string | null;
  model: string | null;
  belong: string | null;
  chargeUserCode: string | null;
  status: EquipmentStatus;
  location: string | null;
  purchaseDate: number | null;
  deliveryDate: number | null;
  useYears: number | null;
  purchasePrice: number | null;
  description1: string | null;
  description2: string | null;
}
